defmodule Giom.Repo.Migrations.CreateIsts do
  use Ecto.Migration

  def change do
    create table(:ists) do
      add :ist_id, :string
      add :stock_code, references(:stocks,type: :string, column: :code, on_delete: :nothing), null: false
      add :stock_name, :string
      add :qty, :decimal, null: false
      add :i_qty, :decimal
      add :i_qty2, :decimal
      add :i_qty3, :decimal
      add :price, :decimal

      timestamps()
    end
  end
end
